package student.web.internal;

import java.util.List;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.UiException;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventThreadCleanup;

import cloudspace.vm.VM;

public class VMTagCleanup implements EventThreadCleanup
{

	@Override
	public void cleanup(Component comp, Event evt, List errs) throws Exception
	{
		for(Throwable t : (List<Throwable>)errs)
		{
			t = org.webcat.exceptiondoctor.ExceptionDoctor.addExplanation(t);
			t.printStackTrace();
		}
		VM.deregisterThread();
	}

	@Override
	public void complete(Component comp, Event evt) throws Exception
	{
		;
	}
}
